package com.controller;

import com.netflix.discovery.DiscoveryClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/6/13 21:08
 * @since JDK 1.8
 */
@RestController
public class HelloProducerController {


    @RequestMapping("/welcome")
    public String hello() throws InterruptedException {
        System.out.println("访问我了==>");
        SimpleDateFormat dateFormat=new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
        return "Hello World: "+dateFormat.format(new Date());
    }

}
